<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <base href="{$Think.RES_URL}vue/"/>
    <script src="js/vue-2.5.2.js"></script>
</head>
<body>
<div id="app">

    <label for="show">test</label><input type="checkbox" v-model="show" id="show">
    <div>
        <p>{{ show }}</p> <div v-if="show">
        显示隐藏内容
        </div>
        <hr>
        {{1+1}}<br>
        {{message.split('').reverse().join('')}}<br>
        {{ 'is show:'+ (show ? 'YES' : 'NO') }}<br>
        <div v-html="message"></div>
        <hr>
        <div v-if="show">
            我叫对话框
        </div>
        <button v-on:click="showDialog">点击按钮显示对话框</button>
        <hr>
        <input v-bind:type="inputType">
        <input v-model="inputType">

    </div>
</div>


<script>
    new Vue(
            {
                el: "#app",
                data: {
                    show: true,
                    showDialogFlag: true,
                    inputType:'text',
                    message: 'i am a message!'
                },
                methods:{
                    showDialog: function() {
                        this.showDialogFlag=!this.showDialogFlag;
                    },
                },
            }
    );

</script>
</body>
</html>